package com.gogowan.agroenterprise.contorl.RetrofitUtil;

import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Url;


public interface Url_Interface {

//    @POST("/MyJavaDemo/home/login")
//    Call<String> Login(@Body RequestBody  body);
    //JSON 字符式交互
    //不可变更地址
//    @POST("/user/Login")
//    Call<String> Login(@Body RequestBody body);
    @POST("FwzsHandler.ashx")
    Call<String> Post1(@Body RequestBody body);
    @GET("")
    Call<String> nGet();
    //可变更接口地址
    @FormUrlEncoded
    @POST
    Call<String> Post2(@Url String url, @Body RequestBody body);
    @GET
    Call<String> Get2(@Url String url);
    //表单式数据交互
    @FormUrlEncoded
    @POST
    Call<String> Post3(@Field("User") String User,
                       @Field("pws") String pws);


    //上传文件
    @Multipart
    @POST("")
    Call<String> TopFile(@Part MultipartBody.Part file);

}
